package com.bw.mallshop.mvvm.viewmodel;

import android.widget.Button;
import android.widget.ImageView;
import android.widget.RadioButton;

import androidx.databinding.ObservableField;

import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.bw.mallshop.R;
import com.bw.mallshop.mvvm.model.BottomModel;
import com.bw.mallshop.mvvm.model.entity.BottomEntity;
import com.bw.mvvm_common.entity.BaseEntity;
import com.bw.mvvm_common.mvvm.viewmodel.BaseViewModel;

import org.greenrobot.eventbus.EventBus;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

public
/**
 * @author Lishaohe
 * @description:
 * @date :2021/10/15 0015 下午 6:54
 *
 */
class BottomViewModel extends BaseViewModel<BottomModel> {
//    public ObservableField<RadioButton> sy = new ObservableField<>();

    @Override
    public void onCreate() {
        super.onCreate();
        requestbottom();


    }

    public void requestbottom(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("imie","1");
        m.requestBottom(map).observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(this);
    }

    @Override
    protected void result(BaseEntity entity) {
        BottomEntity bottomEntity = (BottomEntity) entity;

        List<BottomEntity.DataBean> data = bottomEntity.getData();


    }
    public void back(){

    }
    public void click(){
        ToastUtils.showLong("asdasd");
    }
    public void clickcate(){
//        ToastUtils.showLong("asdasd");
//        EventBus.getDefault().postSticky("a");
    }
}
